
<%@ page import="java.util.*" %>
<%@ page import="org.team.sdsc.datamodel.*" %>

<%
     String siteVal = request.getParameter("site");
     Network network = NetworkFactory.newInstance();
     List<String> events = network.getSamplingEvents();
     network.close();

     if (events.isEmpty()) {
        events.add("2009.01");     
     }     
%>

{
   results: [

<%
    int k = 0;
    for (Iterator i=events.iterator(); i.hasNext(); ) {
	if (k > 0) {
	    out.println("      ,");
	}
	out.println("      {  name : '"+i.next()+"' }" ); 
	k++;
    }
%>


  ]
}